<template>
	<view>
		<my-login v-if="!token1"></my-login>
		<my-userinfo v-else></my-userinfo>
	</view>
</template>

<script>
	import { mapState } from 'vuex';
	export default {
		data() {
			return {
				token1 : ''
			};
		},
		computed : {
			...mapState('user',['token'])
		},
		watch : {
			token(newVal) {
				this.token1 =  newVal ? true : false
			}
		}
	}
</script>

<style lang="scss">

</style>
